<?php
	include ("../_conf/constantes.php");
	include ("../config.php");
	
	require_once (PEARPATH . "HTML/Template/IT.php");
	$tpl = new HTML_Template_IT(TPLPATH);
	$conn = ADONewConnection($dsnComisiones);
	$conn->SetFetchMode(ADODB_FETCH_ASSOC);
	$sql = "SELECT nombredependencia, iddependencia FROM dependencia";
	//$rs = $conn->query("SELECT * FROM empleado");
	//n renombrando datos
	$rs = $conn->Execute($sql);
	$nmenu = "dependencia";
	$valor = "";
	$default_str = "";
	$itemBlanco = "Selecciones una dependencia";
	$depeSelect = $rs->GetMenu2($nmenu, 
					$default_str,
					$blank1stItem = "$valor:$itemBlanco",
					false,
					0,
					'class="select"');
	$sql = "SELECT idvigencia as codvigencia, idvigencia FROM vigencia";
	$rs = $conn->query($sql);
	$nmenu = "vigencia";
	$valor = "";
	$default_str = "";
	$itemBlanco = "Seleccione vigencia";
	$vigenciaSelect = $rs->GetMenu2($nmenu, 
					$default_str,
					$blank1stItem = "$valor:$itemBlanco",
					false,
					0,
					'class="select"');
	$tpl->loadTemplatefile("formCargaCsv.htm");
	$tpl->setVariable("TITULO_PAGINA", "Formulario Para Carga Masiva");
	$tpl->setVariable("CSSURL", URLCSS);
	$tpl->setVariable("DEPE_SELECT", $depeSelect);
	$tpl->setVariable("VIGENCIA_SELECT", $vigenciaSelect);
	$tpl->show();
?>
